Large enterprises typically comprise a plurality of different departments, e.g., manufacturing, assembly, sales, accounting and so on. In order to provide executives of an enterprise with sufficient data for decision-making, the data of each of the departments has to be collected and prepared before it is presented to the executive. Typically, the respective departments are distributed over multiple locations which makes the task of acquiring relevant information and of determining the performance of each of the departments a challenge. This is even more the case since the complexity of the tasks of each department, e.g., monitoring sales of goods in a specific region, requires highly sophisticated and specific software. For instance, the accounting department uses specific software for calculating the balance sheet, while the manufacturing or the sales department may need completely different and special software.
However, executives, in particular senior executives, require versatile information from all departments of the enterprise in order to determine the performance of the enterprise or to derive trends and to compare them, e.g., to previously defined strategic goals of the enterprise.
Software that is specifically designed for acquiring, analyzing and displaying such data in order to support the executives in decision-making is commonly referred to as executive information system (EIS, cf. definition in Wikipedia). The executives could, e.g., use their client computer to access the EIS in order to retrieve the information from the EIS instead of retrieving information from various systems by themselves.
In addition to the above described complexity of acquiring information from various internal and external sources, an EIS system faces the further technical obstacle that software programs usually have a unique and not standardized interface for communication. Thus, establishing connections is very difficult.
To overcome this problem, the J2EE connector architecture (http://java.sun.com/developer/technicalArticles/J2EE/connectorclient/resourceadapter.html) has evolved as a de facto standard which many vendors have adopted for building a resource adapter. The resource adapter plays a central role in the integration and connectivity between an EIS, a client computer (e.g., the computer of the executive) and an application server. The client which intends to communicate with the EIS does so via the resource adapter. In other words, the resource adapter may be regarded as the mediator of the connection. The client accesses the EIS via the resource adapter. The resource adapter could be part of the application server which also hosts the EIS. However, all components could also be located in different systems. The resource adaptor generally uses a factory for the creation of connections in a connection pool. Moreover, it manages the lifecycle from the creation of a connection to making it available and to destroying any inactive/timed out connections. To achieve this, rather than creating a connection every time an operation has to be performed, the connection pool maintains the configuration information which is needed to connect the client to the EIS and creates a certain number of configurable connection objects beforehand so as to avoid the overhead of creating the same every time.
Hence, by maintaining the pool of connections, requests by clients and/or client applications for performing operations can be instantly triggered by using the connection objects already created in the connection pool. The connection objects return back to the connection pool once the operation is completed. When a new connection is needed, it is firstly checked whether there is any available connection object in the connection pool that can be used. If all known connections are occupied by other client requests, a new connection object can be created.
However, the J2EE Connector Architecture (JCA) allows to create, destroy or access only one connection at a time. FIG. 1 is an illustration of the mechanism as known from prior art. Multiple requests for connection boom to woe by one or more clients are waiting to be processed by the resource adapter 130. However, at a certain point in time only one connection request 110 is processed and may retrieve a connection object from the connection pool 120, while the other connections have to wait. This limitation causes a severe performance bottleneck when there are several processes (also referred to as threads) trying to obtain access to the connection pool 120 in order to subsequently establish a connection 140 with the EIS 150. This problem can be observed particularly during heavy load, e.g., when many clients try to connect to the EIS simultaneously, or when a single client tries to establish multiple connections to the EIS simultaneously, or if the connection creation takes a long time. As a consequence, threads pile up at the connection pool which has to reject more and more requests. The result may be a crash of the client application and/or the EIS, but also a crash of the connection pool. In this case, all connections of the connection pool have to be re-established which takes a long time.
The US patent application 2011/0153581 discloses virtual connection drivers that are created and maintained to connect to data sources. The proposed solution is specific to a database and comprises an application process requiring a connection to a database server which is provided by a driver providing a virtual database connection interface to the application. At any given point in time, only one thread has access to a pool comprising the connections.
It is therefore the technical problem underlying certain example embodiments of the present invention to improve the properties of the connector architecture so as to provide a faster, more stable and thus more efficient connection pooling for establishing connections between an executive information system and one or more clients.
In one embodiment, this problem is solved by a resource adapter configured to establish connections between an executive information system (EIS) and one or more clients, the resource adapter comprising:    a. at least a first and a second connection pool (240a-e, 320a-d) both maintaining a plurality of connection objects, wherein each connection object defines a channel of communication between the EIS (220) and the resource adapter (200); and    b. a cluster coordinator (230, 300) configured to assign a first connection object in a first connection pool (240a-e, 320a-d) and a second connection object in a second connection pool (240a-e, 320a-d) to the one or more clients (210) to create at least two coexisting connections between the one or more clients (210) and the EIS (220).
Such an embodiment allows to overcome the above mentioned disadvantages of the prior art at least in part. In more detail, by introducing a plurality of connection pools, a crash of a single connection pool does no longer require re-establishing all connections but only the connections of the respective pool. Moreover, the cluster coordinator selects the connection objects out of the plurality of connection pools which allows for an improved connection establishment. In more detail, the cluster coordinator may initiate more than one connection by using more than one connection pool at an instance of time. Thus, the cluster coordinator can handle multiple threads at a time which greatly increases the throughput, i.e., the establishment and the degradation of a connection. The connections need not be established at the same time. However, the connections exist at the same time.
Preferably, the resource adapter is configured to assign several connection objects to a single client (210).
Depending on the type of the client and information that is to be retrieved it may be necessary to establish multiple connections between the EIS and a certain client. This requires several connection objects each specifying distinct connection information for establishing a connection. For instance, when the client makes multiple requests to access the EIS via the resource adapter, the resource adapter facilitates each of these requests with a connection. The client then obtains the one or more connections from the resource adapter. As an illustrative example, a connection may be visualized as a kind of channel that is created and through which the two systems can communicate.
It is further preferred that the resource adapter comprises at least one cluster wherein each cluster comprises at least two connection pools.
This allows for an improved structure of the connection pools of the resource adapter. In this way, several connection pools could be grouped together, e.g., into clusters for different purposes. A first cluster could be used as main cluster, while a second cluster could be used as backup cluster. It is also possible to group connection objects relating to certain types of applications.
Preferably, the resource adapter comprises a connection pool health registry configured to monitor the status of at least one, preferably all of the connection pools.
Maintaining information about the status of the connection pools enables the resource adapter to select connection objects out of the available connection pools in an optimized manner. Moreover, the status may indicate that a certain connection pool is presently unavailable and therefore no request for connection object can be addressed to that connection pool. The information about the connection pools may also comprise details about the pool size, the number of available connections or whether the connection pool has no connection objects available. This avoids unnecessary requests to connection pools and improves the performance of the connection pooling.
It is further preferred that the status comprises information about available connection objects of the at least two connection pools.
The information about available connection objects comprises details about the connections that are presently available, e.g., the type of connection that could be created using a certain connection object. Further, the connection pool health registry may indicate that all available connection objects of a respective pool are presently not available or that a certain connection pool already processes several threads. As a result, another connection pool may be chosen. This allows for a more efficient selection of certain connection objects out of several connection pools.
Preferably, the resource adapter comprises a connection pool manager configured to create one more new connection objects in the at least two connection pools.
The connection pool manager is an entity which may handle the lifecycle of connection objects in the connection pool. For several reasons it may happen that a desired connection is not yet pre-defined. In this case, the connection pool manager may create a new connection object comprising connection information. The connection pool manager may select a suitable connection pool depending on certain parameters, e.g., whether there is space for another connection object, or depending on the load of a certain connection pool.
It is further preferred that a new connection object is created using a connection factory.
When the resource adapter creates a new connection object it may use a certain set of configuration parameters that has been defined in advance in the connection factory. This set could comprise any helpful connection information related to the connection itself such as originating IP or timeout parameters. Therefore, this feature improves the creation of a certain connection object.
Preferably, the connection pool manager is further configured to modify or delete connection objects in the at least two connection pools.
The connection information regarding a connection between the EIS and the resource adapter and/or client could change for various reasons. This may happen due to a reconfiguration of the client. In such cases the connection pool manager may modify an existing connection object or parts thereof. A certain connection object may also become useless. Instead of occupying a “slot” of the connection pool, the connection object can be deleted by the connection pool manager.
It is also preferred that the connection pool manager is further configured to update the connection pool health registry.
If the connection pool manager makes any changes to one or more connection pools such as creating, modifying or deleting connections, they can be announced to the connection pool health registry. Thus, in case of a connection request, the connection pool manager can simply query the connection pool health registry and retrieve information about the connection objects in one or more of the connection pools, wherein the information is always up to date.
Preferably, the connection pool manager is further configured to destroy inactive connections to release the corresponding connection objects.
It may happen that a connection object is unavailable because it was marked as being used by a connection. However, for some reasons, the connection may have timed out or not be used anymore without returning the connection object to the connection pool. In this case, the connection pool manager may destroy inactive connections. As a result connection objects can become available to other connections again. Thus, the availability of connections can be increased. Furthermore, it has to be noted that an inactive connection could result in a crash which would require to restart the connection pool. By destroying such inactive connection prior to such a crash the stability of the resource adapter can be improved.
Another embodiment relates to a method for establishing a connection between an executive information system, EIS (220), and at least one client (210), the method comprising the following steps:    a. providing at least a first and a second connection pool (240a-e, 320a-d) both maintaining a plurality of connection objects, wherein each connection object defines a channel of communication between the EIS (220) and the resource adapter (200); and    b. providing a cluster coordinator (230, 300) assigning a first connection object in a first connection pool (240a-e, 320a-d) and a second connection object in a second connection pool (240a-e, 320a-d) to the one or more clients (210) to create at least two coexisting connections between the one or more clients (210) and the EIS (220).
Further dependent claims are defined in the detailed description.